import React, { Component } from 'react'
import PropTypes from 'prop-types'
import './index.css'
export default class CatsList extends Component {

  static propTypes = {
    catsList: PropTypes.array.isRequired
  }

  render() {
    const { catsList } = this.props
    return (
      <div>
        {
          catsList.map(cat => {
            return <p key={cat.name} className='cat-item'>{cat.name}</p>
          })
        }
      </div>
    )
  }
}
